﻿using System;

namespace Sherwood.Content
{
    public static class MetaRepositoryExtensionMethods
    {
        /// <summary>
        /// Get meta based on global unique id. Equivalent to repository[id]
        /// </summary>
        /// <param name="repository">The repository to get the meta from</param>
        /// <param name="id">The unique id of the meta to receive</param>
        /// <returns>Returns the meta instance with the given id if it exists and null if meta does not exist</returns>
        public static IMeta GetById (this IMetaRepository repository, Guid id)
        {
            return repository[id];
        }
    }
}